﻿using System.Collections.Generic;
using RHD.Data.DAO;

namespace RHD.Service.Implementation {
	public class GenericService<T, K> : IGenericService<T, K> {
		protected IGenericDAO<T, K> dao;

		#region IGenericService<T,K> Members

		public virtual void Save(T model) {
			dao.Save(model);
		}

		public virtual void Delete(T model) {
			dao.Delete(model);
		}

		public virtual IList<T> GetAll() {
			return dao.GetAll();
		}

		public virtual T GetById(K id) {
			return dao.GetById(id);
		}

		#endregion
	}
}
